home *** CD-ROM | disk | FTP | other *** search
/ AOL File Library: 2,801 to 2,900 / aol-file-protocol-4400-2801-to-2900.zip / AOLDLs / C++ Files Library / Point_Rect C++ Classes / MacObj.sit / MacObj ƒ / CPoint.cp next >
Text File  |  1993-09-11  |  1KB  |  56 lines

  1. #ifdef _MACOBJ_SPEED
  2. #define _MACOBJ_INLINE inline
  3. #else
  4. #define _MACOBJ_INLINE
  5. #include "CPoint.h"
  6. #endif
  7.  
  8. _MACOBJ_INLINE CPoint::CPoint()
  9. {
  10. }
  11.  
  12. _MACOBJ_INLINE CPoint::CPoint(short ih, short iv)
  13. { h = ih; v = iv; }
  14.     
  15. _MACOBJ_INLINE CPoint::CPoint(Point p)
  16. { *(Point*)this = p; }
  17.  
  18. _MACOBJ_INLINE void CPoint::Offset(short oh, short ov)
  19. { h+=oh; v+=ov; }
  20.  
  21. _MACOBJ_INLINE void CPoint::Offset(Point p)
  22. { h+=p.h; v+=p.v; }
  23.  
  24. _MACOBJ_INLINE Boolean CPoint::operator==(Point p) const
  25. { return h == p.h && v == p.v; }
  26.  
  27. _MACOBJ_INLINE Boolean CPoint::operator!=(Point p) const
  28. { return h != p.h || v != p.v; }
  29.  
  30. _MACOBJ_INLINE void CPoint::operator+=(Point p)
  31. { h+=p.h; v+=p.v; }
  32.  
  33. _MACOBJ_INLINE void CPoint::operator-=(Point p)
  34. { h-=p.h; v-=p.v; }
  35.  
  36. _MACOBJ_INLINE CPoint CPoint::operator+(Point p) const
  37. { return CPoint(h+p.h, v+p.v); }
  38.  
  39. _MACOBJ_INLINE CPoint CPoint::operator-(Point p) const
  40. { return CPoint(h-p.h, v-p.v); }
  41.  
  42. _MACOBJ_INLINE CPoint CPoint::operator-() const
  43. { return CPoint(-h, -v); }
  44.  
  45. _MACOBJ_INLINE void CPoint::Move(void)
  46. { ::Move(h, v); }
  47.  
  48. _MACOBJ_INLINE void CPoint::MoveTo(void)
  49. { ::MoveTo(h, v); }
  50.  
  51. _MACOBJ_INLINE void CPoint::Line(void)
  52. { ::Line(h, v); }
  53.  
  54. _MACOBJ_INLINE void CPoint::LineTo(void)
  55. { ::LineTo(h, v); }
  56.